/**
 * 
 */
package model;

import java.util.ArrayList;
import java.util.List;

import common.DataManager;
import common.GridCoordinate;

/**
 * @author Bill
 * 
 * Type of automatic weapon with a square range of 7x7
 * a damage of 3, rate of 2 and speed of 1.
 *
 */
public class LargeTurret extends AutomaticWeapon {

	private static final int DEFAULT_COST = 750;
	private static final int DEFAULT_DAMAGE = 3;
	private static final int DEFAULT_SPEED = 8;
	private static final int DEFAULT_RANGE_INT = 2;
	private static final int DEFAULT_RATE = 2;
	
	//LargeTurret without position
	public LargeTurret(){
		super("Large Turret", DataManager.LARGE_TURRET, DataManager.LARGE_TURRET_AMMO, DEFAULT_COST, DEFAULT_DAMAGE, DEFAULT_SPEED, DEFAULT_RANGE_INT, DEFAULT_RATE );
		
	}
	
	//LargeTurret with position
	public LargeTurret( GridCoordinate position){
		super("Large Turret", DataManager.LARGE_TURRET, DataManager.LARGE_TURRET_AMMO, DEFAULT_COST, position, DEFAULT_DAMAGE, DEFAULT_SPEED, DEFAULT_RANGE_INT, DEFAULT_RATE );
		
		List<GridCoordinate> range = new ArrayList<GridCoordinate>();
		
		//Creates a square range of size 5x5
		for( int i = -1*DEFAULT_RANGE_INT; i <= DEFAULT_RANGE_INT; ++i ){
			for( int j = -1*DEFAULT_RANGE_INT; j <= DEFAULT_RANGE_INT; ++j ){
				range.add( new GridCoordinate( position.getX() + i, position.getY() + j));
			}
		}
		setRange(range);
		
	}
	
	@Override
	public void rotateCCW() {
		//Square range so it stays the same	
	}

	@Override
	public void createRange() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String getDescription() {
		return "The Large Turret fires on all zombosaurs within a 2 tile radius and deals a large amount of damage.";
	}


}
